package com.itheima.math;

public class MathDemo {
    public static void main(String[] args) {
        //绝对值
        System.out.println(Math.abs(-9));
        //向上取整
        System.out.println(Math.ceil(8.7));
        //向下取整
        System.out.println(Math.floor(7.3));
        //四舍五入
        System.out.println(Math.round(5.45));
        //次幂
        System.out.println(Math.pow(2, 4));
       //随机
        System.out.println(Math.random());

    }
}
